select * from (
select cmp_target_elm_Id, cmp_path, SYS_CONNECT_BY_PATH(cmp_source_elm_Id || '[' || cmp_cat_Id || ']','/') || '/' || cmp_target_elm_Id   "CMP_CALC_PATH" from composition 
connect by prior cmp_target_elm_id =cmp_source_elm_Id
start with cmp_source_elm_Id not in(
select cmp_target_elm_Id from composition  
))
where CMP_CALC_PATH != CMP_PATH 